﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="Content_list.aspx.cs" Inherits="Content_list" %>
<%@ Register src="UserControl/NewAnnounce.ascx" tagname="NewAnnounce" tagprefix="UserControl" %>
<%@ MasterType VirtualPath="~/MasterPage/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
   #toptype{ width:100%; height:35px;background:url(<%=ResolveUrl("~/images/search-xx.gif")%>) repeat-x; border-collapse:collapse;
             border:#d8d8d8 1px solid; margin-bottom :10px; border-collapse:collapse; vertical-align:top; padding:0px;}
   #toptype a{ display:block; float:left;  height:25px; padding-top:10px; padding-left:20px; padding-right:20px; text-align:center;top:-10px;}
   #outtable{ width:100%; border-collapse:collapse; empty-cells:show; }
   #outtable #outleft{ width:250px; vertical-align:top; padding-right:5px;}
   #outtable #outright{border:1px #d6d6d6 solid; vertical-align:top;background:url(<%=ResolveUrl("~/images/con_body-x.png")%>) repeat-y;}
   .textbody{ position:relative; margin-left:10px; width:95%; border-bottom:1px #7f8080 dashed ;}
   .textbody .texttitle{ font-size:18px;  vertical-align:middle; width:auto; padding:5px; padding-top:10px;color:#019aac; font-weight:bold;}
   .textbody .textmain{ width:100%; line-height:150%; padding:10px; color:#535555;}
   .textbody .textbuttom{ text-align:right; padding-right:5px; padding-bottom:5px; color:#909090;}
   .textbody .textbuttom .link{ float:right; width:95px; height:25px; display:block; position:relative; margin-left:10px; margin-top:5px;
                                background:url(images/link.png) no-repeat !important;/* FF IE7 */
                                _background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/link.png');/* IE6 */}
   .textbody .textbuttom .link:hover{ background:url(images/linkhover.png) no-repeat !important;/* FF IE7 */
                                      _background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/linkhover.png');/* IE6 */}
</style>
<script type="text/javascript">
    jQuery(document).ready(function () {
        //处理左边文章发布的随滚动条滚动
        var navH = $("#NewAnnounce_body").offset().top;
        jQuery(window).scroll(function () {
            var scroH = $(this).scrollTop();
            if(scroH>=navH){
                jQuery("#NewAnnounce_body").css({"position":"fixed","top":0});
            }else if(scroH<navH){
                jQuery("#NewAnnounce_body").css({"position":"static"});
            }
        });
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Panel ID="Panel_zhidujianshe" runat="server" Visible="false">
<div id="toptype">
  <img alt="" src='<%=ResolveUrl("~/images/zhidujianshe.gif")%>' style=" margin-top:-2px; float:left;"/>
    <asp:Repeater ID="subclass" runat="server">
      <ItemTemplate>
        <a href='<%#ResolveUrl("~/News-"+Eval("forbigclass")+"-"+Eval("smallclassid")+".aspx")%>'><%#Eval("smallclassname")%></a>
      </ItemTemplate>
    </asp:Repeater>
</div>
</asp:Panel>
<table id="outtable">
  <tr >
    <td id="outleft" >
        <div id="NewAnnounce_body">
            <UserControl:NewAnnounce ID="NewAnnounce1" runat="server" />
        </div>
    </td>
    <td id="outright">
  <div style=" height:20px; width:99%; margin-left:2px; border:1px solid #d6d6d6; margin-top:5px; background-color:#b7b8b9;">
     <span style=" margin-left:10px; display:block; margin-top:2px;">
        现在的位置:首页
        <asp:Label ID="theclass" runat="server"></asp:Label>
     </span>
  </div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>

  <div style=" width:97%; height:auto; margin-top:5px; background-color: White; margin-bottom:10px;  padding-bottom:15px; margin-left:10px;">
    <asp:Repeater ID="Repeater1" runat="server">
       <ItemTemplate>
          <div class="textbody">
             <div class="texttitle">
                 <%# Eval("NewTitle")%>
             </div>
             <div class="textmain">
                 <%#
                    TSubstring(Eval("Contents").ToString()).Length > 200 ? 
                    TSubstring(Eval("Contents").ToString()).Substring(0,200)+"......":
                    TSubstring(Eval("Contents").ToString())                
                 %>
             </div>
             <div class="textbuttom">
              编辑：<%# Eval("Author")%>&nbsp;&nbsp;&nbsp;&nbsp;
              发表时间：<%# Eval("AddTime","{0:d}")%>&nbsp;&nbsp;&nbsp;&nbsp;
              点击：(<%# Eval("hits")%>)  <br />
              <a class="link" href='<%#ResolveUrl("~/News-"+Eval("BigClassId")+"-"+Eval("SmallClassId")+"-"+Eval("id")+".aspx")%>' target="_blank"></a>
              <div style="clear:both"></div>
             </div>
          </div>
       </ItemTemplate>
    </asp:Repeater>
         <span style=" position:relative; width:510px; left:50%; margin-left:-255px; margin-top:25px; display:block;">
             <asp:LinkButton ID="toone" runat="server"  OnClick="toone_Click">[首页]</asp:LinkButton>          
             <asp:LinkButton ID="toup" runat="server" OnClick="toup_Click">[上一页]</asp:LinkButton>&nbsp;
             <asp:LinkButton ID="tonext" runat="server"  OnClick="tonext_Click">[下一页]</asp:LinkButton>
             <asp:LinkButton ID="tolast" runat="server" OnClick="tolast_Click">[尾页]</asp:LinkButton>&nbsp;
             [跳转到第
                 <asp:DropDownList ID="jumppage" runat="server" 
                    onselectedindexchanged="jumppage_SelectedIndexChanged" AutoPostBack="true" 
                     style=" height:20px; margin-left:3px; margin-bottom:-3px;">
                 </asp:DropDownList>页]&nbsp;&nbsp;
              [页次:<asp:Label ID="Label1" runat="server" ForeColor="red"></asp:Label> / <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>页] 
              [共<asp:Label ID="pagesum" runat="server" Text="Label" ForeColor="red"></asp:Label>项 
             <asp:Label ID="tpagesizes" runat="server" Text="Label" ForeColor="red"></asp:Label>项/页]
         </span>
     </div>
</ContentTemplate>
</asp:UpdatePanel>
    </td>
  </tr>
</table>
</asp:Content>

